"use client";
import { Button } from "@/components/ui/button";
import { Brain, Sparkles } from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";

export default function AgentLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const pathname = usePathname();

  return (
    <div className="flex-1 flex flex-col h-full">
      <header className="flex items-center justify-center gap-4 p-4">
        <Link href="/agent/validation">
          <Button
            variant={
              pathname.startsWith("/agent/validation") ? "default" : "ghost"
            }
          >
            <Sparkles className="h-5 w-5" />
            智能体推理
          </Button>
        </Link>
        <Link href="/agent/training">
          <Button
            variant={
              pathname.startsWith("/agent/training") ? "default" : "ghost"
            }
          >
            <Brain className="h-5 w-5" />
            智能体训练
          </Button>
        </Link>
      </header>
      {children}
    </div>
  );
}
